<layout name='Layout/layout_page' />
	
	<ol class="breadcrumb">
		<li><a href="<{:U('TrainCate/index')}>">training program</a></li>
      	<li class="active">edit</li>
    </ol>

	<form id="ajaxForm" action="<{:U('TrainCate/update')}>" method="post" class="form-horizontal form-validata">
		<div class="form-group">
			<label class="col-md-1 control-label" for="">name</label>
			<div class="col-md-11">
				<input type="text"
                class="form-control"
				name="name"
				id="name"
				value="<{$list['name']}>" 
				data-rule-required="true"
				/>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-1 control-label" for="picname">thumbnail</label>
			<div class="col-md-11">
				<img class="thumbPic" id="picname_src" src="<{$list['picname']}>" />
				<input type="hidden" name="picname" id="picname" value="<{$list['picname']}>" />
				<p class="pic-btn"><input type="button" value="upload" class="btn btn-default btn-sm" onclick="uploadImage( '<{:U('Admin/Upload/singleImage')}>' , 'picname')"/> <input type="button" value="delete" class="btn btn-default btn-sm" onclick="delImage('picname')"/></p>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-1 control-label" for="keyword">state</label>
			<div class="col-md-11">
				<label class="radio-inline">
					<input type="radio" name="show" value="1" <php>if($list['show']==='1')echo checked;</php>> display
				</label>
				<label class="radio-inline">
					<input type="radio" name="show" value="0" <php>if($list['show']==='0')echo checked;</php>> hide
				</label>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-1 control-label" for="sort">sort</label>
			<div class="col-md-11">
				<input type="text"
                class="form-control"
				class="input-small"
				name="sort"
				id="sort"
				value="<{$list['sort']}>" 
				data-rule-required="true"
				data-rule-number="true"
				/>
				<p>small to large array</p>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-1 control-label" for="keywords">Course introduction</label>
			<div class="col-md-11">
				<textarea name="content" id="container"><{$list['content']}></textarea>
				<script type="text/javascript" src="<{:C('UE_DIR')}>/my.config.js"></script>
				<script type="text/javascript" src="<{:C('UE_DIR')}>/ueditor.all.js"></script>
				<script type="text/javascript" src="<{:C('UE_DIR')}>/lang/zh-cn/zh-cn.js"></script>
				<script type="text/javascript">
				var defPath = "<{:C('UPLOAD_PATH')}>";
				window.UEDITOR_CONFIG.imagePath= defPath;  //插入<{:L(_public_edit)}>器中图片路径修正
				window.UEDITOR_CONFIG.filePath= defPath; //插入<{:L(_public_edit)}>器中文件路径修正
				window.UEDITOR_CONFIG.scrawlPath= defPath; //涂鸦默认路径
				var editor = UE.getEditor('container');
				</script>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-1 control-label" for="keywords">Employment prospects</label>
			<div class="col-md-11">
				<textarea name="prospects" id="prospects"><{$list['prospects']}></textarea>
				<script type="text/javascript">
				var editor = UE.getEditor('prospects');
				</script>
			</div>
		</div>
			
		<div class="form-group">
			<div class="col-md-11 col-sm-offset-1">
				<button type="submit" class="btn btn-info">edit</button>
			</div>
		</div>
		<input type="hidden" name="id" value="<{$list['id']}>" />
	</form>
<input type="hidden" id="menu_action" value="train" />

